Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests #28

Merged
merged 4 commits into from
Dec 20, 2023
Merged

Integration tests #28

merged 4 commits into from
Dec 20, 2023

Conversation

Argonus
Copy link
Contributor

@Argonus Argonus commented Dec 2, 2023

Test Containers

Add container based tests for kafka. Using this approach, we will be able to test more edge-cases scenarios, as in future we are going to add multiple different case support there, like kraft based apporach, multi nodes apporach and so on and so on.

Documentation

Downside

  • test containers are additional elixir dependency, that is not that common as plain docker compose
  • test containers requires v1.15 elixir version. That means a little ugly if for test version.

Props

  • test containers gives us ability to start kafka dynamicly per case
  • test containers are supporting multiple kafka distributions & consensus strategies

Goal

Migrate all integration tests & follow ruby-kafka functional tests apporach.

@Argonus Argonus requested a review from dantswain December 2, 2023 14:46
@Argonus Argonus force-pushed the integration-tests branch 16 times, most recently from c8921a3 to 3aa8f41 Compare December 3, 2023 07:05
@Argonus Argonus marked this pull request as ready for review December 3, 2023 07:27
@dantswain
Copy link
Collaborator

I'm fine with trying this approach. The only concern I can think of is how does one run tests locally? Are there any additional steps? The main thing I'd want is to have at least some amount of testing that can be done locally and to update the readme with instructions

@Argonus
Copy link
Contributor Author

Argonus commented Dec 10, 2023

@dantswain It's even easier, and test-containers are handling that :)
So you don't even have run docker compose up -d you can just run mix test & have docker enabled.
I'll update README.md

- Bump kayrock v0.2
- Bump required version to 1.10
- Add tests for 1.15
Add integration tests based on tests containers library.
This will allow us to test more complex scenarios than a single docker-compose based ones.

s
@Argonus Argonus merged commit 16f4457 into kafkaex:master Dec 20, 2023
10 checks passed
@Argonus Argonus deleted the integration-tests branch December 20, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants